package com.ycq.webssm.controller;

import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

/**
 * @ClassName: ExceptionController
 * @Author: ycq
 * @Description:
 * @Date: 2021/8/19 22:56
 * @Company:浪潮软件集团
 **/
@ControllerAdvice
public class ExceptionController {


    @ExceptionHandler(value = {Exception.class})
    public String testException(Exception ex, Model model) {
        model.addAttribute("ex",ex);
        return "error";
    }




}
